3.4 \(\int \tan ^4(c+d x) \, dx\)

Optimal. Leaf size=28 \[ \frac{\tan ^3(c+d x)}{3 d}-\frac{\tan (c+d x)}{d}+x \]

[Out]

x - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.015247, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3473, 8} \[ \frac{\tan ^3(c+d x)}{3 d}-\frac{\tan (c+d x)}{d}+x \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^4,x]

[Out]

x - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d)

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \tan ^4(c+d x) \, dx &=\frac{\tan ^3(c+d x)}{3 d}-\int \tan ^2(c+d x) \, dx\\ &=-\frac{\tan (c+d x)}{d}+\frac{\tan ^3(c+d x)}{3 d}+\int 1 \, dx\\ &=x-\frac{\tan (c+d x)}{d}+\frac{\tan ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.0109749, size = 38, normalized size = 1.36 \[ \frac{\tan ^3(c+d x)}{3 d}+\frac{\tan ^{-1}(\tan (c+d x))}{d}-\frac{\tan (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^4,x]

[Out]

ArcTan[Tan[c + d*x]]/d - Tan[c + d*x]/d + Tan[c + d*x]^3/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 35, normalized size = 1.3 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3\,d}}-{\frac{\tan \left ( dx+c \right ) }{d}}+{\frac{dx+c}{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^4,x)

[Out]

1/3*tan(d*x+c)^3/d-tan(d*x+c)/d+1/d*(d*x+c)

________________________________________________________________________________________

Maxima [A]  time = 2.72585, size = 39, normalized size = 1.39 \begin{align*} \frac{\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4,x, algorithm="maxima")

[Out]

1/3*(tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.80023, size = 66, normalized size = 2.36 \begin{align*} \frac{\tan \left (d x + c\right )^{3} + 3 \, d x - 3 \, \tan \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4,x, algorithm="fricas")

[Out]

1/3*(tan(d*x + c)^3 + 3*d*x - 3*tan(d*x + c))/d

________________________________________________________________________________________

Sympy [A]  time = 0.290155, size = 27, normalized size = 0.96 \begin{align*} \begin{cases} x + \frac{\tan ^{3}{\left (c + d x \right )}}{3 d} - \frac{\tan{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \tan ^{4}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**4,x)

[Out]

Piecewise((x + tan(c + d*x)**3/(3*d) - tan(c + d*x)/d, Ne(d, 0)), (x*tan(c)**4, True))

________________________________________________________________________________________

Giac [B]  time = 2.38089, size = 790, normalized size = 28.21 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4,x, algorithm="giac")

[Out]

1/12*(3*pi + 12*d*x*tan(d*x)^3*tan(c)^3 - 3*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*
tan(c))*tan(d*x)^3*tan(c)^3 - 3*pi*tan(d*x)^3*tan(c)^3 + 6*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*t
an(d*x)^3*tan(c)^3 + 6*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^3*tan(c)^3 - 36*d*x*tan(d*x)
^2*tan(c)^2 + 9*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan(c)^2
+ 9*pi*tan(d*x)^2*tan(c)^2 - 18*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*tan(d*x)^2*tan(c)^2 - 18*arc
tan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^2*tan(c)^2 + 12*tan(d*x)^3*tan(c)^2 + 12*tan(d*x)^2*ta
n(c)^3 + 36*d*x*tan(d*x)*tan(c) - 9*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*tan(c))*
tan(d*x)*tan(c) - 4*tan(d*x)^3 - 9*pi*tan(d*x)*tan(c) + 18*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*t
an(d*x)*tan(c) + 18*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)*tan(c) - 36*tan(d*x)^2*tan(c) -
 36*tan(d*x)*tan(c)^2 - 4*tan(c)^3 - 12*d*x + 3*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x)
- 2*tan(c)) - 6*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c))) - 6*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan
(c) - 1)) + 12*tan(d*x) + 12*tan(c))/(d*tan(d*x)^3*tan(c)^3 - 3*d*tan(d*x)^2*tan(c)^2 + 3*d*tan(d*x)*tan(c) -
d)